package com.example.higo.view.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import java.util.List;

/**
 * Created by wj on 2016/11/7.
 */

public class MainVpAdapter extends BaseVpAdapter {
    private List<String> titles;

    public MainVpAdapter(FragmentManager fm, List<Fragment> data, List<String> titles) {
        super(fm, data);
        this.titles = titles;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        if (titles.size() != 0) {
            return titles.get(position);
        }
        return String.valueOf(position);
    }
}
